import { Notification, Message } from 'element-ui';

export default {
    successNotification(message) {
        //  *@functionName: 通知的封装(成功)
        return Notification({
            title: '成功提示',
            message: message,
            type: '成功提示',
            position: 'top-right'
        });
    },
    //  *@functionName: 通知的封装(错误)
    errNotification(message) {
        return Notification.error({
            title: '错误提示',
            message: message,
            type: 'error',
            position: 'top-right'
        });
    },
    //  *@functionName: 通知的封装(警告)
    warningNotification(message) {
        return Notification.error({
            title: '警告',
            message: message,
            type: 'warning',
            position: 'top-right'
        });
    },
    //  *@functionName: 通知的封装(消息)
    infoNotification(message) {
        return Notification.info({
            title: '通知',
            message: message,
            type: 'info',
            position: 'top-right'
        });
    },

    messageWarning(options) {
        return Message.warning({
            message: options,
            duration: 3000,
        })
    },

}










